<template>
    <div class="studentifo">
        <h3 v-text="msg"></h3>
        <p>学校名：{{name}}</p>
        <p>地址：{{address}}</p>
        <button @click="check_school">查看学校名称</button>
        <button @click="unbind">解绑自定义事件</button>
    </div>
</template>

<script>
// import {x} from "../minxin"
export default {
    name:"School",
    data(){
        return {
            msg:"学校信息",
            name:'TJCU',
            address:'天津'
        }
    },
    methods:{
        check_school(){
            this.$emit('useBysu',this.name)
            this.$emit('demo')
            // this.$emit('click')
        },
        //解绑事件
        unbind(){
            // this.$off('demo') //解绑单个事件
            // this.$off(['demo','useBysu']) //解绑多个事件
            this.$off() // 解绑全部事件
        }
    }
    // mixins:[x]
}
</script>

<style>
    .studentifo{
        background-color: black;
    }
</style>
